<!DOCTYPE html>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!--360浏览器优先以webkit内核解析-->
    <title>管理后台</title>
	<link href="favicon.ico" rel="shortcut icon" >
	<link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
	<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
	<link href="../static/css/main/animate.min.css" th:href="@{/css/main/animate.min.css}" rel="stylesheet"/>
	<link href="../static/css/main/style.min862f.css" th:href="@{/css/main/style.min862f.css}" rel="stylesheet"/>
</head>

<body class="gray-bg">
    <div class="row  border-bottom white-bg dashboard-header">
		<blockquote class="text-warning" style="font-size:28px">
			欢迎使用管理后台！
		</blockquote>
    </div>
    <div class="wrapper wrapper-content">
        <div class="row">
            <div class="col-sm-4">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>登录日志</h5>
                    </div>
                    <div class="ibox-content">
						<table id="bootstrap-table-logininfo"></table>
                    </div>
                </div>
            </div>
			<div class="col-sm-4">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<h5>操作日志</h5>
					</div>
					<div class="ibox-content">
						<table id="bootstrap-table-operlog"></table>
					</div>
				</div>
			</div>
            <div class="col-sm-4">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>更新日志</h5>
                    </div>
                    <div class="ibox-content no-padding">
                        <div class="panel-body">
                            <div class="panel-group" id="version">
								<div class="panel panel-default">
									<div class="panel-heading">
									   <h5 class="panel-title">
										   <a data-toggle="collapse" data-parent="#version" href="#v41">v4.1.0</a><code class="pull-right">2019.10.22</code>
									   </h5>
									</div>
									<div id="v41" class="panel-collapse collapse in">
										<div class="panel-body">
										   <ol>
												<li>支持多表格实例操作</li>
												<li>浮动提示方法tooltip支持弹窗</li>
												<li>代码生成&字典数据支持模糊条件查询</li>
											</ol>
										</div>
									</div>
								</div>
								<div class="panel panel-default">
									<div class="panel-heading">
									   <h5 class="panel-title">
										   <a data-toggle="collapse" data-parent="#version" href="#v40">v4.0.0</a><code class="pull-right">2019.08.08</code>
									   </h5>
									</div>
									<div id="v40" class="panel-collapse collapse">
										<div class="panel-body">
										   <ol>
												<li>代码生成支持预览、编辑，保存方案</li>
												<li>新增防止表单重复提交注解</li>
											</ol>
										</div>
									</div>
								</div>
                        	</div>
                    	</div>
                	</div>
            	</div>
        	</div>
		</div>
    </div>


	<th:block th:include="include :: footer" />
    <script th:inline="javascript">
	    $('#pay-qrcode').click(function(){
	        var html=$(this).html();
	        parent.layer.open({
	            title: false,
	            type: 1,
	            closeBtn:false,
	            shadeClose:true,
	            area: ['600px', 'auto'],
	            content: html
	        });
	    });

        $(function() {
            var prefix = ctx + "monitor/logininfor";
            var options = {
                id: "bootstrap-table-logininfo",
                url: prefix + "/list",
                sortName: "loginTime",
                sortOrder: "desc",
                modalName: "登录日志",
                showPageGo: false,
                showSearch: false,
                showRefresh:false,
                showColumns:false,
                showToggle:false,
                columns: [
                    {
                        field: 'infoId',
                        title: '访问编号'
                    },
                    {
                        field: 'loginName',
                        title: '登录名称'
                    },
                    {
                        field: 'ipaddr',
                        title: '登录地址'
                    },
                    {
                        field: 'status',
                        title: '登录状态',
                        align: 'center',
                        formatter: function(value, row, index) {
                            if (value == 0) {
                                return '<span class="badge badge-primary">成功</span>';
                            } else if (value == 1) {
                                return '<span class="badge badge-danger">失败</span>';
                            }
                        }
                    },
                    {
                        field: 'msg',
                        title: '操作信息'
                    },
                    {
                        field: 'loginTime',
                        title: '登录时间'
                    }]
            };
            $.table.init(options);
        });

        $(function() {
            var prefix = ctx + "monitor/operlog";
            var datas = [[${@dict.getType('sys_oper_type')}]];
            var options = {
                id: "bootstrap-table-operlog",
                url: prefix + "/list",
                sortName: "operTime",
                sortOrder: "desc",
                modalName: "操作日志",
                showPageGo: false,
                showSearch: false,
                showRefresh:false,
                showColumns:false,
                showToggle:false,
                columns: [
                    {
                        field: 'operId',
                        title: '日志编号'
                    },
                    {
                        field: 'title',
                        title: '系统模块'
                    },
                    {
                        field: 'businessType',
                        title: '操作类型',
                        align: 'center',
                        formatter: function(value, row, index) {
                            return $.table.selectDictLabel(datas, value);
                        }
                    },
                    {
                        field: 'operName',
                        title: '操作人员'
                    },
                    {
                        field: 'deptName',
                        title: '部门名称'
                    },
                    {
                        field: 'operIp',
                        title: '主机'
                    },
                    {
                        field: 'status',
                        title: '操作状态',
                        align: 'center',
                        formatter: function(value, row, index) {
                            if (value == 0) {
                                return '<span class="badge badge-primary">成功</span>';
                            } else if (value == 1) {
                                return '<span class="badge badge-danger">失败</span>';
                            }
                        }
                    },
                    {
                        field: 'operTime',
                        title: '操作时间'
                    }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>
